package com.txl.web.servlets;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.txl.domain.ContactBean;
import com.txl.domain.ContactGroupBean;
import com.txl.pager.PageBean;
import com.txl.pager.QueryInfo;
import com.txl.service.ContactGroupService;
import com.txl.service.ContactService;
import com.txl.utils.WebUtils;

//查找指定分组下的所有联系人信息
public class FindContactInfoServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String groupid = request.getParameter("groupid");
		QueryInfo info = WebUtils.request2Bean(request, QueryInfo.class);
		ContactService service = new ContactService();
		PageBean pagebean = service.pageQueryByItem(info);
		request.setAttribute("pagebean", pagebean);
		request.setAttribute("groupid", groupid);
		request.getRequestDispatcher("/page/contactByItem.jsp").forward(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doGet(request, response);
	}

}
